﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using DictationToolSilverlight.ViewModel;

namespace DictationToolSilverlight.View
{
    public partial class DictationToolView : UserControl
    {
        public DictationToolView()
        {
            InitializeComponent();
            dictationTool = new DictationToolViewModel();
            this.DataContext = dictationTool;
        }

        protected override void OnKeyUp(KeyEventArgs e)
        {
            switch (e.Key)
            {
                case Key.F7:
                    dictationTool.MediaPlayerViewModel.PlayPauseCommand.Execute(null);
                    break;
                case Key.F8:
                    dictationTool.MediaPlayerViewModel.RepeatCommand.Execute(null);
                    break;
                default:
                    break;
            }

            base.OnKeyUp(e);
        }

        private DictationToolViewModel dictationTool;
    }
}
